<script language="javascript" type="text/javascript">
/*<![CDATA[*/
	$(function(){
		$("#lnkSave").click(function(){
			$('#adminForm').submit();
		});

		$("#lnkClose").click(function(){
			window.location = '<?php echo DOMAIN?>/incomes';
		});

	});
/*]]>*/
	function Checkvalue(ElementID){
		var checkBox = document.getElementById(ElementID);
		if(checkBox.checked==true)
			checkBox.value=1; 
		else checkBox.value=0; 
	}
</script>
<style>
div.width-50 {
    margin-left: 200px;
    width: 70%;
}
</style>
<div id="content-box">
	<div class="border">
		<div class="padding">
			<div id="toolbar-box">
   			<div class="t"><div class="t"><div class="t"></div></div></div>
			<div class="m">
				<div class="toolbar" id="toolbar">
				<table class="toolbar">
				<tr>
                    <td class="button" id="toolbar-save">
                    <a href="javascript:;// Cập nhật" id="lnkSave" class="toolbar">
                        <span class="icon-32-save" title="Cập nhật"></span>
                        Cập nhật
                    </a>
                    </td>
					<td class="button" id="toolbar-cancel">
					<a href="javascript:;//Đóng" id="lnkClose" class="toolbar">
						<span class="icon-32-cancel" title="Đóng"></span>
						Đóng
					</a>
					</td>
				</tr>
				</table>
				</div>
				<div class="header icon-48-langmanager">Tỉ lệ phần trăm hoa hồng</div>
				<div class="clr"></div>
			</div>
			<div class="b"><div class="b"><div class="b"></div></div></div>
			</div>
			<div class="clr"></div>
			<div id="element-box">
				<div class="t"><div class="t"><div class="t"></div></div></div>
				<div class="m">
<form action="<?php echo DOMAIN?>/configs" method="post" name="adminForm" enctype="multipart/form-data" id="adminForm" autocomplete="off">

<div id="contents" title="" style="overflow: none;">

<fieldset class="adminform"><legend>Tỉ lệ phần trăm hoa hồng trực tiếp</legend>
<table cellspacing="1" cellpadding="1" border="0" bgcolor="#CCCCCC">
	<tbody>
		<tr>
            <td bgcolor="#EAF1F7" align="center" width="5.88%"><legend>Cấp độ</legend></td>
<?php foreach ($namesOfLevel as $nameOfLevel){?>
			<td bgcolor="#EAF1F7" align="center" width="5.88%"><?php echo $nameOfLevel?></td>
<?php }?>
		</tr>
        <tr bgcolor="#FFFFFF" height="28">
        <td bgcolor="#EAF1F7" align="center" width="5.88%"><legend>Phần trăm</legend></td>
<?php
    foreach ($namesOfLevel as $key => $nameOfLevel){
?>
            <td align="center">
        <?php echo $this->Form->input('DirectCommission.' . $key .'',array('label'=>'','class'=>'inputbox', 'style'=>'width: 30px;text-align: center;', 'onkeypress'=>'return keypress(event);')); ?>
            </td>
<?php }?>
        </tr>
	</tbody>
</table>
</fieldset>

<fieldset class="adminform"><legend>Tỉ lệ phần trăm hoa hồng gián tiếp</legend>
<table cellspacing="1" cellpadding="1" border="0" bgcolor="#CCCCCC">
    <tbody>
        <tr>
            <td bgcolor="#EAF1F7" align="center" width="5.88%"></td>
<?php foreach ($namesOfLevel as $nameOfLevel){?>
            <td bgcolor="#EAF1F7" align="center" width="5.88%"><?php echo $nameOfLevel?></td>
<?php }?>
        </tr>
<?php
    foreach ($namesOfLevel as $key => $nameOfLevel){
?>
        <tr bgcolor="#FFFFFF" height="28">
        <td bgcolor="#EAF1F7" align="center" width="5.88%"><?php echo $namesOfLevel[$key];?></td>
<?php 
        foreach ($namesOfLevel as $key1 => $nameOfLevel1){
?>
            <td align="center">
        <?php echo $this->Form->input('IndirectCommission.' . $key .'.' . $key1,array('label'=>'','class'=>'inputbox', 'style'=>'width: 30px;text-align: center;', 'onkeypress'=>'return keypress(event);')); ?>
            </td>
<?php 
        }
    }
?>
        </tr>
    </tbody>
</table>
</fieldset>


<fieldset class="adminform"><legend>Tỉ lệ phần trăm hoa hồng lãnh đạo</legend>
<table cellspacing="1" cellpadding="1" border="0" bgcolor="#CCCCCC">
    <tbody>
        <tr>
            <td bgcolor="#EAF1F7" align="center" width="5.88%"></td>
<?php foreach ($namesOfLevel as $nameOfLevel){?>
            <td bgcolor="#EAF1F7" align="center" width="5.88%"><?php echo $nameOfLevel?></td>
<?php }?>
        </tr>
<?php
    foreach ($namesOfLevel as $key => $nameOfLevel){
?>
        <tr bgcolor="#FFFFFF" height="28">
        <td bgcolor="#EAF1F7" align="center" width="5.88%"><?php echo $namesOfLevel[$key];?></td>
<?php 
        foreach ($namesOfLevel as $key1 => $nameOfLevel1){
?>
            <td align="center">
        <?php echo $this->Form->input('LeadCommission.' . $key .'.' . $key1,array('label'=>'','class'=>'inputbox', 'style'=>'width: 30px;text-align: center;', 'onkeypress'=>'return keypress(event);')); ?>
            </td>
<?php 
        }
    }
?>
        </tr>
    </tbody>
</table>
</fieldset>



<fieldset class="adminform"><legend>Tỉ lệ phần trăm hoa hồng toàn cầu</legend>
<table cellspacing="1" cellpadding="1" border="0" bgcolor="#CCCCCC">
    <tbody>
        <tr>
            <td bgcolor="#EAF1F7" align="center" width="5.88%"><legend>Cấp độ</legend></td>
<?php foreach ($namesOfLevel as $nameOfLevel){?>
            <td bgcolor="#EAF1F7" align="center" width="5.88%"><?php echo $nameOfLevel?></td>
<?php }?>
        </tr>
        <tr bgcolor="#FFFFFF" height="28">
        <td bgcolor="#EAF1F7" align="center" width="5.88%"><legend>Phần trăm</legend></td>
<?php
    foreach ($namesOfLevel as $key => $nameOfLevel){
?>
            <td align="center">
        <?php echo $this->Form->input('GlobalCommission.' . $key .'',array('label'=>'','class'=>'inputbox', 'style'=>'width: 30px;text-align: center;', 'onkeypress'=>'return keypress(event);')); ?>
            </td>
<?php }?>
        </tr>
    </tbody>
</table>
</fieldset>
</div>
</form>
<div class="clr"></div>
				</div>
				<div class="b"><div class="b"><div class="b"></div></div></div>
			</div>
			<noscript>Warning! JavaScript must be enabled for proper operation of the Administrator back-end.</noscript>
			<div class="clr"></div>
		</div>
		<div class="clr"></div>
	</div>
</div>
